﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="openCardList.aspx.cs" Inherits="WebSite.admin.product.openCardList" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server" >
    <ext:PageManager ID="PageManager1" runat="server" />
      <ext:SimpleForm ID="extForm1" runat="server" BodyPadding="5px"   
            EnableBackgroundColor="false" Title="开卡管理"  ShowHeader="true" >
              <Items>

            <ext:Panel ID="Panel2" ShowHeader="false"  CssClass="x-form-item" ShowBorder="false" Layout="Column" runat="server">

             <Items>
             <ext:Label ID="lblRowCount"  Width="40px"  runat="server" Text="&nbsp;行数："></ext:Label>
              <ext:DropDownList ID="ddlRowCount"  runat="server"  Text="行数" Width="50px"  ShowLabel="true" Label="行数">
              <ext:ListItem Text="50" Value="50" />
              <ext:ListItem Text="100" Value="100" />
              <ext:ListItem Text="200" Value="200" />
              <ext:ListItem Text="500" Value="500" />
              </ext:DropDownList>
             <ext:Label ID="lblCardStates"   runat="server" Text="&nbsp;&nbsp;卡状态："></ext:Label>
           <ext:DropDownList ID="ddlCardStates"  runat="server" Width="100px"  Text="卡状态" ShowLabel="true" Label="卡状态"></ext:DropDownList>
             <ext:Label ID="lblCardType"  Width="60px"    runat="server" Text="&nbsp;&nbsp;卡类别："></ext:Label>
          <ext:DropDownList ID="ddlCardType"  runat="server"  Text="卡类别" ShowLabel="true" Label="卡类别"></ext:DropDownList>
            <ext:Label ID="lblCardFrom"  Width="60px"    runat="server" Text="&nbsp;&nbsp;卡号从："></ext:Label>
            <ext:TextBox runat="server" ID="txtCardFrom"   MaxLength="20" Label="卡号从" ></ext:TextBox>
              <ext:Label ID="lblCardTo"     runat="server" Text="&nbsp;至&nbsp;"></ext:Label>
             <ext:TextBox runat="server" ID="txtCardTo" Label="到" MaxLength="20"></ext:TextBox>
                  </Items>
         </ext:Panel>
        <ext:Panel ID="Panel3" ShowHeader="false" CssClass="x-form-item"  ShowBorder="false" Layout="Column" runat="server">
             <Items>
              <ext:Label ID="lblPublishWay"  Width="70px"    runat="server" Text="&nbsp;发行方式："></ext:Label>
                <ext:DropDownList ID="ddlPublishWay"  runat="server" Width="60px"  Text="发行方式" ShowLabel="true" Label="发行方式">
                <ext:ListItem Text="卡券" Value="卡券" Selected="true" />
                <ext:ListItem Text="电子券" Value="电子券" />
                </ext:DropDownList>
               <ext:Label ID="Label1"  Width="70px"    runat="server" Text="&nbsp;使用方式："></ext:Label>
               <ext:DropDownList ID="ddlUseWay"  runat="server" Width="60px"  Text="使用方式" ShowLabel="true" Label="发行方式">
                <ext:ListItem Text="专用" Value="1" Selected="true" />
                <ext:ListItem Text="通用" Value="0" />
                </ext:DropDownList>

                  <ext:Label ID="lblTimeFrom"  Width="70px"    runat="server" Text="&nbsp;&nbsp;时间从："></ext:Label>
                    <ext:DatePicker ID="dpkTimeFrom" Width="100px" Label="时间从" runat="server">
                    </ext:DatePicker>
                     <ext:Label ID="lblTimeTo"    runat="server" Text="&nbsp;至&nbsp;"></ext:Label>
                    <ext:DatePicker ID="dpkTimeTo" Width="100px" Label="到" runat="server">
                    </ext:DatePicker>
                <ext:Button ID="btnSearch" Text="搜索"  CssClass="mleft mright" runat="server" 
                     OnClick="btnSearch_Click"></ext:Button>
              <ext:Button ID="btnExport" Text="导出"  CssClass="mright" runat="server"></ext:Button>
          </Items>
        </ext:Panel>
     </Items>
     
   </ext:SimpleForm>

   <ext:Panel ID="Panel8" ShowBorder="True" ShowHeader="false" BoxFlex="1"  CssClass="x-form-item"  Layout="Fit"
                runat="server">
                <Toolbars>
                    <ext:Toolbar ID="Toolbar2" runat="server">
                        <Items>
                   <ext:Button ID="btnOpenCardApplication" runat="server" Text="批量申请激活" 
                    ConfirmTarget="self" ConfirmText="如果您有预付款，将直接激活选中的礼品卡，并扣除相应的预付款，确定要激活选中的礼品卡吗？" 
                    onclick="btnOpenCardApplication_Click" >
                 </ext:Button>
                  <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                            </ext:ToolbarSeparator>
                 <ext:Label ID="lblUpdateCompany"  Width="120px"  runat="server" Text="选择要更新的经销商："></ext:Label>
                 <ext:DropDownList ID="ddlUpdateProvence"  runat="server" Width="100px"  
                     Text="选择省" ShowLabel="true" Label="选择省"       AutoPostBack="true"
                     OnSelectedIndexChanged="ddlUpdateProvence_SelectedIndexChanged"></ext:DropDownList>
                 <ext:DropDownList ID="ddlUpdateLevel"  runat="server" Width="120px"  AutoPostBack="true" 
                     Text="选择商家级别" ShowLabel="true" Label="选择商家级别" 
                     OnSelectedIndexChanged="ddlUpdateLevel_SelectedIndexChanged"></ext:DropDownList>
                 <ext:DropDownList ID="ddlUpdateCompany"  runat="server" Width="180px"  Text="选择商家" ShowLabel="true" Label="选择商家"></ext:DropDownList>
                 <ext:Button ID="btnUpdateCompany" runat="server" Text="批量更新商家" 
                    ConfirmTarget="self" ConfirmText="确定要更新商家吗？" 
                     OnClick="btnUpdateCompany_Click" >
                 </ext:Button>
                       <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                            </ext:ToolbarSeparator>
                 <ext:Label ID="lblUpdateStates"  Width="80px"  runat="server" Text="选择卡状态："></ext:Label>
                 <ext:DropDownList ID="ddlUpdateStates"  runat="server" Width="100px"  Text="卡状态" ShowLabel="true" Label="卡状态"></ext:DropDownList>
                 <ext:Button ID="btnUpdataStates" runat="server" Text="批量更新状态"  
                     ConfirmTarget="self" ConfirmText="确定要批量更新选中的礼品卡状态吗？" 
                     OnClick="btnUpdataStates_Click"   >
                 </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
                <Items>
    </Items>
    </ext:Panel>
         <ext:Grid ID="Grid1" Title="查询结果" PageSize="50" ShowBorder="false"  
        CssClass="x-form-item"  Height="394px"  AllowPaging="true" 
        SortColumn="cardcode" SortDirection="ASC"     
                        OnPageIndexChange="Grid1_PageIndexChange" 
        ShowHeader="False" runat="server" EnableCheckBoxSelect="True"   
        AllowSorting="true"    IsDatabasePaging="true" 
                        DataKeyNames="cardid" OnSort="Grid1_Sort" 
        EnableRowNumber="True" onrowcommand="Grid1_RowCommand">

        <Columns>
        
            <ext:BoundField Width="100px" ColumnID="cardcode" SortField="cardcode" DataField="cardcode" DataFormatString="{0}"
                HeaderText="卡 号" />
           <ext:BoundField Width="100px" ColumnID="CardTypeName" SortField="CardTypeId" DataField="CardTypeName" DataFormatString="{0}"
                HeaderText="礼品卡类别" />
            <ext:BoundField Width="120px" ColumnID="publishWay" SortField="publishWay" DataField="publishWay" DataFormatString="{0}"
                HeaderText="发行方式" />
              <ext:BoundField Width="120px" ColumnID="UseWay" SortField="UseWay" DataField="UseWay" DataFormatString="{0}"
                HeaderText="使用方式" />
                   <ext:BoundField Width="100px" ColumnID="cardPrice" SortField="cardPrice" DataField="cardPrice" DataFormatString="{0}"
                HeaderText="福点数" />
                   <ext:BoundField Width="140px" ColumnID="exptime" SortField="exptime" DataField="exptime" DataFormatString="{0}"
                HeaderText="有效日期" />
                <ext:BoundField Width="160px" ColumnID="companyName" SortField="companyId,IICompanyId,IIICompanyId,IVCompanyId" DataField="companyName" DataFormatString="{0}"
                HeaderText="商家" />
                <ext:BoundField Width="100px" ColumnID="states" SortField="states" DataField="statesName" DataFormatString="{0}"
                HeaderText="状 态" />
                <ext:BoundField Width="100px" ColumnID="openTime" SortField="openTime" DataField="openTime" DataFormatString="{0:yyyy-MM-dd}"
                HeaderText="开卡日期" />
                 <ext:BoundField Width="100px" ColumnID="AreadyPublishNoOpenTime" SortField="AreadyPublishNoOpenTime" DataField="AreadyPublishNoOpenTime" DataFormatString="{0:yyyy-
MM-dd}"
                HeaderText="领用日期" />
                    <ext:BoundField Width="100px" ColumnID="ApplicationOpenTime" SortField="ApplicationOpenTime" DataField="ApplicationOpenTime" DataFormatString="{0:yyyy-MM-dd}"
                HeaderText="申请开卡日期" />
                  <ext:LinkButtonField ConfirmText="确定要激活吗？" ConfirmTarget="Top" ColumnID="lbtnOpen"  HeaderText="操作"
                Width="50px" CommandName="open" Text="激活" />

          <ext:WindowField Width="60px" WindowID="Window1" HeaderText="备注" Text="详细"   ToolTip="详细" DataIFrameUrlFields="cardid"
                                DataIFrameUrlFormatString="cardRemark.aspx?cid={0}" Title="详细"
                                IFrameUrl="~/alert.aspx" />


        </Columns>
    </ext:Grid>

     <ext:Window ID="Window1" Title="弹出窗体" Popup="false" EnableIFrame="true" IFrameUrl="about:blank"
        Target="Parent" runat="server"  IsModal="true" Width="500px"
        EnableConfirmOnClose="true" Height="300px">
    </ext:Window>


    </form>
</body>
</html>
